package cn.hackcloud.concurrency.per;

import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class Operator {
    private final ThreadPoolExecutor poolExecutor = new ThreadPoolExecutor(10, 100,
            0L, TimeUnit.MILLISECONDS,
            new LinkedBlockingQueue<>());

    public void call(String business) {
        TaskHandler taskHandler = new TaskHandler(new Request(business));
        poolExecutor.execute(taskHandler);
    }
}
